package com.hqd.ch03.v12.io.support;


import com.hqd.ch03.v12.io.Resource;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

/**
 * 文件系统路径下的资源
 */
public class FileSystemResource implements Resource {
    private String path;

    public FileSystemResource(String path) {
        this.path = path;
    }

    @Override
    public InputStream getInputStream() throws IOException {
        return new FileInputStream(path);
    }
}
